package com.smart.mq.listener;

import lombok.extern.slf4j.Slf4j;
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Component;

@Component
@Slf4j
@RocketMQMessageListener(consumerGroup = "hello-consumer-group", topic = "test-msg")
public class ExampleMsgListener implements RocketMQListener<String> {
    @Override
    public void onMessage(String msg) {
        log.info("消息: {}", msg);
    }
}
